import { SerializeStream } from "../../Framework/Serialize/SerializeStream";
import { MarshalException } from "../../Engine/RMI/MarshalException";
type int = number;
//class EBusinessOperation

export class EBusinessOperation {
  constructor(arg1: int) {
    this.__value = arg1;
    return;
  }

  public value(): int {
    return this.__value;
  }

  public __write(arg1: SerializeStream): void {
    arg1.writeByte(this.__value);
    return;
  }

  public static convert(arg1: int): EBusinessOperation {
    return new EBusinessOperation(arg1);
  }

  public static __read(arg1: SerializeStream): EBusinessOperation {
    var loc1 = arg1.readByte();
    if (loc1 < 0 || loc1 >= 14) {
      throw new MarshalException();
    }
    return EBusinessOperation.convert(loc1);
  }

  public static /* const */ _EBusinessOperationApply: int = 1;

  public static /* const */ _EBusinessOperationAgree: int = 2;

  public static /* const */ _EBusinessOperationUpdateMoney: int = 3;

  public static /* const */ _EBusinessOperationUpdateItem: int = 4;

  public static /* const */ _EBusinessOperationLock: int = 5;

  public static /* const */ _EBusinessOperationConfirm: int = 6;

  public static /* const */ _EBusinessOperationCancel: int = 7;

  public static /* const */ _EBusinessOperationError: int = 8;

  public static /* const */ _EBusinessOperationDeduct: int = 9;

  public static /* const */ _EBusinessOperationUnDeduct: int = 10;

  public static /* const */ _EBusinessOperationAdd: int = 11;

  public static /* const */ _EBusinessOperationEnd: int = 12;

  public static /* const */ _EBusinessOperationReject: int = 13;

  public /* var */ __value: int;
}
